﻿<UserControl x:Class="EasySL.UI.Controls.ExDataGridSample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="clr-namespace:EasySL.Controls;assembly=EasySL.Controls"
    >


        <Grid Background="White">
            <StackPanel x:Name="LayoutRoot" Margin="30,10,10,10">
                <StackPanel x:Name="dragItems" Orientation="Horizontal">
                    <TextBlock Margin="10" TextWrapping="Wrap">
                    Drag to bottom datagrid:
                    </TextBlock>
                    <controls:ExDragItem Margin="5">
                        <controls:ExDataGridStringColumn Header="Name" BindProperty="Name" EnableDelete="False"/>
                    </controls:ExDragItem>
                    <controls:ExDragItem Margin="5">
                        <controls:ExDataGridNumberColumn Header="Price" BindProperty="Price" EnableSort="False"/>
                    </controls:ExDragItem>
                    <controls:ExDragItem Margin="5">
                        <controls:ExDataGridPercentColumn Header="Rate" BindProperty="Rate" EnableFilter="False"/>
                    </controls:ExDragItem>
                    <controls:ExDragItem Margin="5">
                        <controls:ExDataGridStringColumn Header="Category" BindProperty="Category"/>
                    </controls:ExDragItem>
                </StackPanel>
                <Grid Width="100"/>
                <StackPanel>
                    <controls:ExDataGrid x:Name="dg" SortProperty="Rate"  AutoGenerateColumns="False" IsShowSummaryRow="True" Width="auto">
                        <controls:ExDataGrid.Columns>
                            <controls:ExDataGridCheckBoxColumn/>
                            <controls:ExDataGridStringColumn Header="Name" BindProperty="Name" EnableDelete="False" Click="ExDataGridStringColumn_Click"/>
                            <controls:ExDataGridNumberColumn Header="Price" BindProperty="Price" EnableSort="False" ShowOrderNumber="True"/>
                            <controls:ExDataGridNumberColumn Header="Price1" BindProperty="Price1" EnableFilter="False" ShowOrderNumber="False"  Parent="Price"/>
                            <controls:ExDataGridNumberColumn Header="Price2" BindProperty="Price2" EnableFilter="False" ShowOrderNumber="False" Parent="Price"/>
                            <controls:ExDataGridPercentColumn Header="Rate" BindProperty="Rate" EnableFilter="False" ShowOrderNumber="True" EnableDelete="True"/>
                            <controls:ExDataGridLinkColumn Header="Introduce" BindUrl="Url" BindProperty="Introduce"/>
                        </controls:ExDataGrid.Columns>
                        <controls:ExDataGrid.Desc>
                            <TextBlock TextWrapping="Wrap" FontSize="10" Foreground="Gray">
                            Extend DataGrid including filter, sort, scroll pager, group, row number, custom data format,  delete column, drag and drop column.
                            </TextBlock>
                        </controls:ExDataGrid.Desc>
                    </controls:ExDataGrid>
                </StackPanel>
                <Grid Width="30"/>
                <TextBlock x:Name="checkedInfo" Opacity="0.5" HorizontalAlignment="Center"/>
        </StackPanel>
        </Grid>

</UserControl>
